finding the domain of a function